package cn.yj.config;

import cn.yj.syslog.entity.SysLog;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author 永健
 * @since 2021-06-23 17:26
 */

public class DeviceInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        request.setAttribute("device", SysLog.ADMIN);
        return true;
    }
}
